﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="BookExchange.Edit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Label ID="lblId" Visible="false" runat="server" />

    <div class="nta-rightSidebar">
        <span id="grow"></span>

        <div class="nta-box5 radius5px shadow">
            <div class="box5-title">
                <div class="box5-title-left">
                </div>
                
                <div class="box5-title-mid">
                    Chỉnh sửa thông tin
                </div>
                
                <div class="box5-title-right">
                </div>
                
            </div>
            

            <div class="box5-content">

                <form id="nta-form" name="nta-form" method="post" action="#" class="frm-myprofile" enctype="application/x-www-form-urlencoded">
                    <input type="hidden" name="nta-form" value="nta-form" />

                    <div class="col">
                        <p>
                            <label><span>Tên sách: </span></label>
                            <asp:TextBox runat="server" ID="txtBookName" class="nta-frm-outputText"/>
                        </p>

                        <p>
                            <label><span>Giá bìa: </span></label>
                            <asp:TextBox runat="server" ID="txtPrice1" class="nta-frm-outputText" ></asp:TextBox>
                        </p>
                        <p>
                            <label><span>Giá bán: </span></label>
                            <asp:TextBox runat="server" ID="txtPrice2" class="nta-frm-outputText" ></asp:TextBox>
                        </p>

                        <p>
                            <label>Số lượng: </label>
                            <asp:TextBox runat="server" ID="txtQuantity" class="nta-frm-outputText" ></asp:TextBox>
                        </p>

                        <p>
                            <label>Đã bán xong: </label>
                            <asp:TextBox runat="server" ID="txtStatus" class="nta-frm-outputText" />
                        </p>
                    </div>

                    <div class="col">
                        <p>
                            <label><span>Loại sách: </span></label>
                            <asp:DropDownList ID="ddlCategory" runat="server" Height="20px" class="nta-frm-outputText"
                                AppendDataBoundItems="true" >
                                <asp:ListItem Text="------------- Choose category -------------" Value="0" />
                            </asp:DropDownList>
                        </p>
                        

                        <p id="pPrice2" runat="server">
                            <label>Liên lạc: </label>
                            <asp:TextBox runat="server" ID="txtContact" class="nta-frm-outputText" ></asp:TextBox>
                        </p>

                        <p>
                            <label><span>Nơi giao dịch: </span></label>
                            <asp:TextBox runat="server" ID="txtExP" class="nta-frm-outputText" ></asp:TextBox>
                        </p>
                        <script>
                            function HideUrl()
                            {
                               document.txt
                            }
                         /*   function openFileOption() {
                                document.getElementById("fileUpload").click();
                            }
                            function uploadOnChange() {
                                var filename = this.value;
                                var lastIndex = filename.lastIndexOf("\\");
                                if (lastIndex >= 0) {
                                    filename = filename.substring(lastIndex + 1);
                                }
                                document.getElementById('txtBookUrl').value = filename;
                            }
                            */
                        </script>
                        <p>
                            <label><a href="#" runat="server" id ="abcdef" onclick="HideUrl()">Đường dẫn ảnh của sách</a> hoặc <a href="#">Chọn file</a> </label>
                            <asp:TextBox runat="server" ID="txtBookUrl" class="nta-frm-outputText-60" ></asp:TextBox>                            
                            <input id="Button1" type="button" value="image" class="nta-frm-outputText-20" onclick="openFileOption()"/>
                            <asp:FileUpload ID="fileUploadBook" runat="server" Width="320px" BorderStyle="None" Visible="true"/>
                            <input type="file" id="fileUpload" onchange="uploadOnChange()"/>
                            <asp:Label ID="lblImage" runat="server"></asp:Label>
                        </p>
                        
                        <p>
                            <label><span>Mô tả nội dung sách: </span></label>
                            <asp:TextBox runat="server" ID="txtDescription" class="nta-frm-outputText"  />
                        </p>
                        

                    </div>

                    <div class="col jsf-marginTop10px jsf-marginBottom10px" style="text-align: center;">
                        <p>
                            <%--<input type="submit" value="Đăng ký" style="width: 80px; height: 28px; margin-right: 10px;" class="button-blue curious-pointer dangnhap radius5px" />--%>
                            <asp:Button ID="btnSave" runat="server" Text="Save" class="button-blue curious-pointer dangnhap radius5px" OnClick="btnSave_Click"
                                Style="width: 80px; height: 28px; margin-right: 10px;" />
                        </p>
                    </div>
                </form>
            </div>
            
        </div>
        
    </div>
    
</asp:Content>
